/*
CUNY - GMapper
Software Design Lab
CSC 22100 - Spring 2011

TEAM 9:
Ariel Teferici
Ivan Tse
Michael Cheong

SVN Repository:
http://code.google.com/p/cuny-gmapper/

Self Sign Keystore API Key:
016ALEKdkgTzxKggwi6PqB2te7tpvOYljG9diXQ
 */
package com.macavelly.com;

import java.io.IOException;
import java.util.List;
import java.util.Locale;

import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.text.Editable;
import android.widget.Button;
import android.widget.EditText;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;





public class MapsActivity extends MapActivity {
	private EditText peaddy; 
	private String mIntentString;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.map);
		String ad1 = AddressInfo.addy;		
		
		MapView mapView = (MapView) findViewById(R.id.mapview); 
		List<Overlay> mapOverlays = mapView.getOverlays();        
		mapView.setBuiltInZoomControls(true);        
		Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker);
		GMapItemizedOverlay itemizedoverlay = new GMapItemizedOverlay(drawable, this);  

		GeoPoint p1 = new geocode(ad1, this).getPoint();
		OverlayItem overlayitem = new OverlayItem(p1, "Address:", ad1);
		itemizedoverlay.addOverlay(overlayitem);
		
		MapController mc = mapView.getController();
		mc.animateTo(p1);
		mc.setZoom(16); 
		mapOverlays.add(itemizedoverlay);



	}

	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}

}
